package org.ftc.service;

import java.util.List;

import org.ftc.dao.CodeUnitDao;
import org.ftc.domain.CodeUnit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CodeUnitService {
	
	@Autowired
	CodeUnitDao codeUnitDao;
	@Autowired
	private UsersService usersService;
	
	public CodeUnit load(String id) {
		return codeUnitDao.load(id);
	}

	public CodeUnit get(String id) {
		return codeUnitDao.get(id);
	}
	
	public synchronized boolean save(CodeUnit entity) {
		return codeUnitDao.save(entity);
	}


	public synchronized boolean saveOrUpdate(CodeUnit entity) {
		return codeUnitDao.saveOrUpdate(entity);
	}

	public synchronized boolean update(CodeUnit entity) {
		return codeUnitDao.update(entity);
	}

	public synchronized boolean delete(CodeUnit entity) {
		return codeUnitDao.delete(entity);
	}

	public synchronized boolean delete(String id) {
		return codeUnitDao.delete(id);
	}
	

	public List<CodeUnit> findAll() {
		return codeUnitDao.findAll();
	}

	public long countAll() {
		return codeUnitDao.countAll();
	}
	
	
	
}
